<template>
	<view class="content-box">
		<view class="list-box" v-for="(item,index) in list" :key="index" @click="click_to(item.id)">
			<view class="image-box">
				<image :src="item.image"></image>
			</view>
			<view class="title">{{item.storeName}}</view>
			<view class="pay-box flex">
				<view class="jifenpay flex">
					<image src="/static/icon_jifen.png"></image>
					<text class="text">{{item.price}}</text>
				</view>
				<view class="itempay">¥{{item.newprice}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"product-list",
		props: {
			list: {
				type: Array
			}
		},
		data() {
			return {
				
			};
		},
		methods:{
			click_to(id) {
				this.$emit('click_to',id);
			},
		}
	}
</script>

<style lang="less">
	.content-box{
		width: 100%;
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
	}
	.list-box {
		width: 344rpx;
		border-radius: 20rpx;
		box-sizing: border-box;
		padding-bottom: 24rpx;
		background-color: #FFFFFF;
		margin-top: 22rpx;
		overflow: hidden;
		box-shadow: 0px 0px 6rpx rgba(49, 74, 196, 0.02);
		.image-box {
			width: 100%;
			height: 347rpx;
			background: #FFFFFF;
		
			image {
				width: 100%;
				height: 347rpx;
			}
		}
		
		.title {
			width: 100%;
			margin-top: 15rpx;
			box-sizing: border-box;
			padding: 0 15rpx;
			overflow: hidden;
			display: -webkit-box;
			-webkit-box-orient: vertical;
			-webkit-line-clamp: 1;
			font-size: 28rpx;
			font-weight: 400;
			color: #000000;
		}
		
		.pay-box {
			width: 100%;
			margin-top: 15rpx;
			align-items: center;
			justify-content: space-between;
			box-sizing: border-box;
			padding: 0 16rpx;
			.jifenpay{
				align-items: center;
				image{
					width: 32rpx;
					height: 32rpx;
				}
				.text{
					font-size: 28rpx;
					font-family: DIN;
					color: #F2921E;
					margin-left: 5rpx;
				}
			}
			.itempay {
				font-size: 28rpx;
				font-family: DIN;
				color: #FF6636;
			}
		}
	}
</style>
